// 纳税人识别号验证
export function validateTaxId(taxId) {
  const regArr = [
    /^[\da-z]{10,15}$/i,
    /^\d{6}[\da-z]{10,12}$/i,
    /^[a-z]\d{6}[\da-z]{9,11}$/i,
    /^[a-z]{2}\d{6}[\da-z]{8,10}$/i,
    /^\d{14}[\dx][\da-z]{4,5}$/i,
    /^\d{17}[\dx][\da-z]{1,2}$/i,
    /^[a-z]\d{14}[\dx][\da-z]{3,4}$/i,
    /^[a-z]\d{17}[\dx][\da-z]{0,1}$/i,
    /^[\d]{6}[\da-z]{13,14}$/i
  ]
  return regArr.some(reg => reg.test(taxId))
}

// 邮箱验证
export function validateEmail(email) {
  return /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(email)
}

// 手机号验证
export function validatePhone(phone) {
  return /^1[3-9]\d{9}$/.test(phone)
}
